﻿using System;

namespace SUT.Utils
{
    public class SuperMath
    {

        public int Sum(int a, int b)
        {
            int sum = a + b;
            LastOperation = "Sum";
            return sum;
        }

        public void DoWork(string input)
        {
            if (String.IsNullOrWhiteSpace(input))
            {
                throw new ApplicationException("Input cannot be empty");
            }
            Counter++;
        }

        public int Counter
        {
            get;
            private set;
        }

        public double Division(int a, int b)
        {
            if (b == 0)
            {
                LastOperation = "Division - ApplicationException";
                throw new ApplicationException();                
            }
            LastOperation = "Division";                
            return a/b;
        }

        public string LastOperation { get; private set; }
    }
}
